package com.andatsoft.laisim.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.andatsoft.laisim.R;
import com.andatsoft.laisim.activity.setting.AboutActivity;
import com.andatsoft.laisim.activity.setting.AlbumArtSettingActivity;
import com.andatsoft.laisim.activity.setting.AudioSettingActivity;
import com.andatsoft.laisim.activity.setting.HeadphonesSettingActivity;
import com.andatsoft.laisim.activity.setting.LibrarySettingActivity;
import com.andatsoft.laisim.activity.setting.LockScreenSettingActivity;
import com.andatsoft.laisim.activity.setting.NewFeatureActivity;
import com.andatsoft.laisim.activity.setting.SkinSettingActivity;
import com.andatsoft.laisim.activity.setting.ThemeSettingActivity;
import com.andatsoft.laisim.activity.setting.WidgetSettingActivity;

public class SettingActivity extends BaseActivity {

	private Button mBtnSelectTheme;
	private Button mBtnSelectSkin;
	private Button mBtnAlbumArt;
	private Button mBtnLibrary;
	private Button mBtnAudio;
	private Button mBtnHeadphones;
	private Button mBtnWidget;
	private Button mBtnLockScreen;
	private Button mBtnAbout;
	private Button mBtnNewFetures;

	// private TextView mTvStaticThemeAndSkin;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_setting);

		initViews();
		setupListeners();
	}

	private void initViews() {
		mBtnSelectTheme = (Button) findViewById(R.id.btn_setting_theme);
		mBtnSelectSkin = (Button) findViewById(R.id.btn_setting_skin);
		mBtnAbout = (Button) findViewById(R.id.btn_setting_about);
		mBtnNewFetures = (Button) findViewById(R.id.btn_setting_new_feature);
		mBtnAlbumArt = (Button) findViewById(R.id.btn_setting_album_art);
		mBtnLibrary = (Button) findViewById(R.id.btn_setting_folder_and_library);
		mBtnAudio = (Button) findViewById(R.id.btn_setting_audio);
		mBtnHeadphones = (Button) findViewById(R.id.btn_setting_headphones);
		mBtnWidget = (Button) findViewById(R.id.btn_setting_widget);
		mBtnLockScreen = (Button) findViewById(R.id.btn_setting_lock_screen);
	}

	private void setupListeners() {
		mBtnSelectTheme.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				startActivity(new Intent(SettingActivity.this,
						ThemeSettingActivity.class));
			}
		});

		mBtnSelectSkin.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				startActivity(new Intent(SettingActivity.this,
						SkinSettingActivity.class));
			}
		});

		mBtnAbout.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				startActivity(new Intent(SettingActivity.this,
						AboutActivity.class));
			}
		});
		mBtnNewFetures.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				startActivity(new Intent(SettingActivity.this,
						NewFeatureActivity.class));
			}
		});
		mBtnAlbumArt.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				startActivity(new Intent(SettingActivity.this,
						AlbumArtSettingActivity.class));
			}
		});

		mBtnLibrary.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				startActivity(new Intent(SettingActivity.this,
						LibrarySettingActivity.class));
			}
		});

		mBtnAudio.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				startActivity(new Intent(SettingActivity.this,
						AudioSettingActivity.class));
			}
		});
		mBtnHeadphones.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				startActivity(new Intent(SettingActivity.this,
						HeadphonesSettingActivity.class));
			}
		});
		mBtnWidget.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				startActivity(new Intent(SettingActivity.this,
						WidgetSettingActivity.class));
			}
		});
		mBtnLockScreen.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				startActivity(new Intent(SettingActivity.this,
						LockScreenSettingActivity.class));
			}
		});
	}

	@Override
	protected void onResume() {
		super.onResume();
		// applyTheme();
	}

	// private void applyTheme() {
	// Theme theme = ThemeManager.getSelectedTheme();
	// mTvStaticThemeAndSkin.setTextColor(theme.getNormalTextColor());
	// }

}
